package main
import "fmt"

type List []int
func (l List) Len() int{
  return len(l)
}
func (l *List) Append(val int){
  *l	= append(*l, val)
}
type Appender interface{
  Append(int)
}
func CountInfo(a Appender, start, end int){
  for i:=start;i<=end;i++{
	a.Append(i)
  }
}
type Lener interface{
  Len() int
}
func LongEnough(l Lener) bool{
  return l.Len() * 10 > 42
}

func main(){
  var lst List
  if LongEnough(lst){
	fmt.Printf("- list is long enough\n")
  }else{
	fmt.Printf("- list is not long enough\n")
  }

  // a pointer value
  plst	:= new(List)
  CountInfo(plst, 1, 10)
  if LongEnough(plst){
	fmt.Printf("- plst is long enough\n")
  }else{
	fmt.Printf("- plist is not long enough\n")
  }
}
